import java.math.BigInteger;


public class Exp implements Node{

	public String token = "<trm>";
	public Node trm;
	public String sign = null;
	public Node exp = null;
	
			
	public Exp(){
		
		this.trm = new Trm();
		int token = PSTree.Core_TK.getToken();
		if (token == 22){
			// if token = +
			this.sign = "+";
			PSTree.Core_TK.skipToken(); // skip +
			this.exp = new Exp();
			
		}
		else if(token == 23){
			// if token = -
			this.sign = "-";
			PSTree.Core_TK.skipToken(); // skip -
			this.exp = new Exp();
		}
		else{
			// return
		}
		
	}

	@Override
	public void print(int indent) {
		this.trm.print(indent);
		if(this.sign != null){
			System.out.print(" " + sign + " ");
		}
		if(this.exp != null){
			this.exp.print(indent);
		}
	}

	
	public void execute() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public BigInteger intexecute() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean compexecute() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public String Stringexcec() {
		// TODO Auto-generated method stub
		return null;
	}
}
